﻿@function breakpoint-infix($name) {
    @return if(breakpoint-min($name) == null, '', '-#{$name}');
}

@function breakpoint-max($name) {
    $next: breakpoint-next($name);

    @return if($next, breakpoint-min($next) - 0.02px, null);
}

@function breakpoint-min($name) {
    $min: map-get($grid-breakpoints, $name);

    @return if($min != 0, $min, null);
}

@function breakpoint-next($name) {
    $breakpoint-names: map-keys($grid-breakpoints);
    $n: index($breakpoint-names, $name);

    @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}
